# Spring
spring:
  application:
    name: ${rootArtifactId}
  main:
    allow-bean-definition-overriding: true
  aop:
    proxy-target-class: true
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
  <#if datasource?? && datasource.address?? && datasource.database?? && datasource.username??>
url: jdbc:mysql://${datasource.address}/${datasource.database}?characterEncoding=utf8
username: ${datasource.username}
password: ${datasource.password!''}
  <#else >
url: jdbc:mysql://${r'${db.address}'}/${r'${db.database}'}?characterEncoding=utf8
username: ${r'${db.username}'}
password: ${r'${db.password}'}
  </#if>
druid:
  async-close-connection-enable: true
  async-init: true
  connectionProperties: "druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000"
  filters: "stat,log4j2"
  initial-size: 5
  max-active: 20
  max-pool-prepared-statement-per-connection-size: 20
  max-wait: 60000
  min-evictable-idle-time-millis: 30000
  min-idle: 5
  pool-prepared-statements: false
  test-on-borrow: false
  test-on-return: false
  test-while-idle: true
  time-between-eviction-runs-millis: 60000
  use-global-data-source-stat: true
#Mybatis
mybatis-plus:
  configuration:
    call-setters-on-nulls: true
    local-cache-scope: "statement"
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
    map-underscore-to-camel-case: true
  global-config:
    banner: false
  mapper-locations: classpath*:mybatis/mapper/**/*.xml

# Maxwell网关配置
flux:
  base-package: ${rootPackage}
  metadata-registry:
  <#if zookeeper?? && zookeeper.address??>
address: ${zookeeper.address}
  <#else >
address: ${r'${zookeeper.address}'}
  </#if>
connection-timeout-ms: 60000
endpoint-path: /maxwell-endpoint
root-path: /maxwell-endpoint
service-path: /maxwell-service
session-timeout-ms: 30000
prefix: ''

# 日志配置
logging:
  config: classpath:logback-spring.xml
  file:
    path: ${r'${user.home}'}/logs